package com.msb.apipassenger.controller;

import com.msb.apipassenger.service.OrderService;
import com.msb.commons.dto.OrderDTO;
import com.msb.commons.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chshh
 * @version: 1.0
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/add")
    public ResponseResult add(@RequestBody OrderDTO orderDTO){
        System.out.println("orderDTO = " + orderDTO);
        return orderService.add(orderDTO);
    }

}
